
<%--
  Created by IntelliJ IDEA.
  User: MSI-PC
  Date: 2021/8/24
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <% String path = request.getContextPath();%>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>Simple Sidebar - Start Bootstrap Template</title>

    <!-- Favicon-->
    <link rel="icon" type="image/x-icon" href="<%=path%>/img/256x.ico" />

    <!-- Core theme CSS (includes Bootstrap)-->
    <link href="<%=path%>/css/styles.css" rel="stylesheet" />

    <!-- 引入font-awesome -->
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.3/css/all.css" rel="stylesheet">

    <!-- 引入bootst图标库 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">

</head>
<body>
<div class="d-flex" id="wrapper">
    <!-- Sidebar-->
    <div class="border-end bg-white text-center" id="sidebar-wrapper">
        <div class="sidebar-heading border-bottom bg-light">czcBlog 后台管理</div>
        <div class="list-group list-group-flush">
            <a class="list-group-item list-group-item-action list-group-item-light p-3" href="${pageContext.request.contextPath}/articleOption/allArticle">文章 <i class="fa fa-file"></i></a>
            <a class="list-group-item list-group-item-action list-group-item-light p-3" href="${pageContext.request.contextPath}/comment.jsp">评论 <i class="fa fa-comments"></i></a>
            <a class="list-group-item list-group-item-action list-group-item-light p-3" href="${pageContext.request.contextPath}/linksOption/allLinks">友链 <i class="fa fa-link"></i> </a>
<%--            <a class="list-group-item list-group-item-action list-group-item-light p-3" href="#!">用户 <i class="fa fa-user"></i> </a>--%>
            <a class="list-group-item list-group-item-action list-group-item-light p-3" href="${pageContext.request.contextPath}/settings.jsp">设置 <i class="fa fa-cog"></i></a>
            <!-- 分割线 -->
            <div class="dropdown-divider"></div>

        </div>
    </div>
    <!-- Page content wrapper-->
    <div id="page-content-wrapper">
        <!-- Top navigation-->
        <nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
            <div class="container-fluid">
                <button class="btn btn-primary" id="sidebarToggle"><i class="fa fa-caret-left"></i> 收起</button>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ms-auto mt-2 mt-lg-0">
                        <li class="nav-item active"><a class="nav-link" href="${pageContext.request.contextPath}/articleOption/indexArticle"><i class="fa fa-home"></i> 返回首页</a></li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user-md"></i> 账户</a>
                            <div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="${pageContext.request.contextPath}/loginCheck/loginOut"><i class="bi bi-box-arrow-left"></i> 登出</a>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="#!">没想好</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
        <!-- Page content-->
        <div class="container-fluid">
            <h1 class="mt-4">友情链接</h1><a class="btn btn-primary" id="article-btn" href="${pageContext.request.contextPath}/links_add.jsp">新增友链</a>
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>名称</th>
                    <th>链接</th>
<%--                    <th>Icon(url)</th>--%>
                    <th>简介</th>
<%--                    <th>添加日期</th>--%>
                    <th>操作</th>
                </tr>
                </thead>

                <tbody>
                <c:forEach var="blogRoll" items="${linkList}">
                <tr>
                    <td>${blogRoll.id}</td>
                    <td><a href="#!">${blogRoll.link_add}</a></td>
<%--                    <td><a href="#!">www.edisoncgh.com/ico</a></td>--%>
                    <td>${blogRoll.link_des}</td>
<%--                    <td>1949-10-1</td>--%>
                    <td>
                        <a href="">修改</a>
                        &nbsp; | &nbsp;
                        <a href="">删除</a>
                    </td>
                </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="<%=path%>/js/scripts.js"></script>
</body>
</html>
